package Entity;

import java.io.Serializable;
import java.util.*;
import javax.persistence.*;

@Entity
@Table (name = "Comandas")
public class ComandaEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column (name = "IdComanda", nullable = false)
	private int id;
	
	@Column (name = "ParaFacturar")
	private boolean factura;
	
	@Column (name = "Realizada")
	private boolean realizada;
	
	@OneToMany  
	@JoinColumn (name = "idComandas")
	private List<ItemPedidoEntity> items = new ArrayList<ItemPedidoEntity>();
	
	@ManyToOne
	@JoinColumn (name = "idPedido")
	private PedidoEntity pedido;
}
